<script>
    var admin_group_id = {$admin_group_id};
</script>
<div class="panel panel-default panel-intro">

    <div class="panel-heading">
        {:build_heading()}
    </div>

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('crm/allot/edit')}"
                           data-operate-del="{:$auth->check('crm/allot/del')}"
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
<script id="customformtpl" type="text/html">
    <form id="cxselectform" class="form-horizontal form-commonsearch nice-validator n-default n-bootstrap" novalidate="" method="post" action="">
        <fieldset>
            <div class="row">
                <!--  <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                      <label for="id" class="control-label col-xs-4">ID</label>
                      <div class="col-xs-8">
                          <input type="hidden" class="form-control operate" name="id-operate" data-name="id" value="=" readonly=""><input type="text" class="form-control" name="id" value="" placeholder="ID" id="id" data-index="1">
                      </div>
                  </div>-->
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="buser.username" class="control-label col-xs-4">客户名称</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="buser.username-operate" data-name="buser.username" value="LIKE" readonly="">
                        <input type="text" class="form-control" name="buser.username" value="" placeholder="客户名称" id="buser.username" data-index="5">
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="status" class="control-label col-xs-4">客户状态</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="status-operate" data-name="status" value="=" readonly="">
                        <select class="form-control" name="status">
                            <option value="">选择</option>
                            <option value="0">无意向客户</option>
                            <option value="1">意向客户</option>
                            <option value="2">谈合作</option>
                            <option value="3">我方盖章</option>
                            <option value="4">对方盖章</option>
                            <option value="5">待付款</option>
                            <option value="6">已签约</option>
                        </select>
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="product.product" class="control-label col-xs-4">产品名</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="product.product-operate" data-name="product.product" value="LIKE" readonly="">
                        <input type="text" class="form-control" name="product.product" value="" placeholder="产品名" id="product.product" data-index="19">
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="typelist" class="control-label col-xs-4">合作状态</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="typelist-operate" data-name="typelist" value="=" readonly="">
                        <select class="form-control" name="typelist">
                            <option value="">选择</option>
                            <option value="1">待合作</option>
                            <option value="2">合作中</option>
                            <option value="3">合作结束</option>
                            <option value="4">暂停合作</option>
                        </select>
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="qilist" class="control-label col-xs-4">期限状态</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="qilist-operate" data-name="qilist" value="=" readonly="">
                        <select class="form-control" name="qilist">
                            <option value="">选择</option>
                            <option value="1">未到期</option>
                            <option value="2">已到期</option>
                            <option value="3">待合作</option>
                        </select>
                    </div>
                </div>
                {if condition='$admin_data["name"] neq "销售专员"'}
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3 group_select">
                    <label for="group" class="control-label col-xs-4">分组</label>
                    <div class="col-xs-8">
                        <!--     <input type="hidden" class="form-control operate" name="qilist-operate" data-name="qilist" value="=" readonly="">-->
                        <div class="form-inline" data-toggle="cxselect" data-selects="first,second">
                            <select class="first form-control operate" id="group" name="group_id-operate" data-url='' data-name="group_id">
                                <option value="">请选择</option>
                                {foreach name='groupData' item='v'}
                                <option value="{$v.id}">{$v.name}</option>
                                {/foreach}
                            </select>
                            <select class="second form-control operate" id="admin_id" name="admin_id-operate" data-name="admin_id" data-url="crm/group/admin_group" data-query-name="pid">
                                <option value="">请选择</option>
                                {foreach name='xiaoData' item='v'}
                                <option value="{$v.id}">{$v.nickname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                {/if}
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <div class="col-sm-8 col-xs-offset-4">
                        <button type="submit" class="btn btn-success" formnovalidate="">提交</button>
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>
</script>
